<?php

// +----------------------------------------------------------------------
// | Api日志
// +----------------------------------------------------------------------
namespace app\admin\model;

use app\admin\service\User;
use app\common\model\Apilog as ApilogBaseModel;
//use think\Model;

class Apilog extends ApilogBaseModel
{

    /**
     * 删除一个月前的日志
     * @return boolean
     */
    public function deleteAMonthago()
    {
        $status = $this->where('create_time', '<= time', time() - (86400 * 30))->delete();
        return $status !== false ? true : false;
    }

}
